package com.xbongbong.workorder.service;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.saas.domain.entity.WorkOrderFlowUserEntity;

import java.util.List;

/**
 *
 * @author 魏荣杰
 * @date 2019/4/16 10:19
 * @since v1.0
 * @version v1.0
 */
public interface WorkOrderFlowUserService {
    /**
     * Description: 创建新的工单负责人
     * @param workOrderId 工单id
     * @param corpid 公司id
     * @param userId 用户id（新主负责人id）
     * @throws XbbException XbbException
     * @author 魏荣杰
     * @date 2019/4/16 10:29
     * @since v1.0
     */
    void createNewMain(Long workOrderId, String corpid, String userId) throws XbbException;

    /**
     * 获取工单当前负责人
     * @param workOrderId
     * @param corpid
     * @return
     */
    WorkOrderFlowUserEntity getMainUser(Long workOrderId, String corpid);

    /**
     * 获取团队成员列表
     * @param workOrderId
     * @param corpid
     * @return
     */
    List<WorkOrderFlowUserEntity> getTeamUserList(Long workOrderId, String corpid);
    /**
     * Description: 在正常工单流转中更新修改工单团队
     * @param mainUserId 负责人id
     * @param coUserIds 抄送人ids
     * @param corpid
     * @throws XbbException XbbException
     * @author 魏荣杰
     * @date 2019/5/5 15:51
     * @since v1.0
     */
    void changeTeamInFlow(String mainUserId, List<String> coUserIds, String corpid, Long workOrderId) throws XbbException;

    void dataConsistencyUpdateUser(String corpid, String userId, String userName, String userAvatar) throws XbbException;
}
